target=libep.so
cmp=clang++

srcfiles = $(wildcard *.cc *.cpp *.cxx)
objs = $(patsubst %.cc, %.o,$(srcfiles))
targets = $(patsubst %.o, %, $(objs))

$(warning ${srcfiles})
$(warning ${objs})
$(warning ${targets})

all:${targets}

%:%.cc
	bear -- ${cmp} -g $^ -o $@

clean:
	for x in ${targets}; do
		$(warning ${x})
		rm ${x}
	done
